

 define(function (require) {
	var $ = require('jquery');
	var base = require('base');
	var com = require('./common');

	// changeLang = function(lang){
	// 	localStorage.setItem("lang", lang);
	// }
	if(localStorage.getItem("lang")){
		var Lang = localStorage.getItem("lang")
	}else{
		var Lang = "zh_CN"
	}


    // 获取底部导航
	$.ajax(seajs.ajaxroot + "getNav",{
		type:'post',
		data:{type:2},
		headers:{
			'locale-language':Lang
		},
		success:function(res){	
            console.log('footer:',res)
			let footerNav = res.data;
			let footerNavList = '';
			for (let index = 1; index <= footerNav.length; index++) {
				footerNavList += '<dl>';
				footerNavList += '<dt>'+footerNav[footerNav.length - index].title+'</dt>';                
                if(footerNav[footerNav.length - index].children.length != 0){
                    footerNav[footerNav.length - index].children.forEach(item=>{
                        footerNavList += '<dd><a href="javascript:void(0);" target="_self">'+item.title+'</a></dd> ';
                    })
                    
                }
				footerNavList += '</dl>';
			}
			$('#footerNavLIst').html(footerNavList)


		},
		error:function(err){
			console.log("error:", err)
		}

	});





})